import request from '@/config/axios'

export const AttrApi = {
  // 新增属性
  createProperty: async (data: any) => {
    return await request.post({ url: '/product/property/create', data })
  },
  // 获取属性列表
  getPropertyList: async (params: any) => {
    return await request.get({ url: '/product/property/page', params })
  },
  // 获取语言
  getLanguageList: async (params: any) => {
    return await request.get({ url: `/trade/globe-state/geLanguageList`, params })
  },
  // /product/property/delete
  // 删除属性
  deleteProperty: async (id: any) => {
    return await request.delete({ url: '/product/property/delete?id=' + id })
  },
  // /product/property/get
  // 获取属性详情
  getPropertyDetail: async (id: any) => {
    return await request.get({ url: '/product/property/get?id=' + id })
  },
  // /product/property/update
  // 更新属性
  updateProperty: async (data: any) => {
    return await request.post({ url: '/product/property/update', data })
  }
}
